package entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;

/**
 * @创建人: 胡亮
 * @创建时间: 2022年11月16日 下午 08:22
 * @描述:用户表
 */
@TableName(value = "user")
@ApiModel("用户表")
@Data
public class User {
    @TableId(type = IdType.AUTO)
    @ApiModelProperty("用户主键id")
    private Integer userId;
    @TableField(value = "user_name")
    @ApiModelProperty("用户名称")
    private String userName;
    @TableField(value = "login_name")
    @ApiModelProperty("登录名称")
    private String loginName;
    @TableField(value = "pass_word")
    @ApiModelProperty("登录密码")
    private String passWord;
    @TableField(value = "user_phone")
    @ApiModelProperty("手机号")
    private String userPhone;
    @TableField(value = "user_sex")
    @ApiModelProperty("性别: 0男 1女")
    private Integer userSex;
    @TableField(value = "user_age")
    @ApiModelProperty("年龄 根据生日进行计算")
    private Integer userAge;
    @TableField(value = "user_birthday")
    @ApiModelProperty("生日")
    @DateTimeFormat(pattern = "yyyy-MM-dd")//DateTimeFormat 是入参格式化；
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")//JsonFormat是出参格式化。
    private Date userBirthday;
    @TableField(value = "user_autograph")
    @ApiModelProperty("个性签名")
    private String userAutograph;
    @TableField(value = "user_file_id")
    @ApiModelProperty("用户头像")
    private String userFileId;
    @TableField(value = "user_address")
    @ApiModelProperty("用户地址")
    private String userAddress;
    @TableField(value = "wechat")
    @ApiModelProperty("绑定的微信")
    private String wechat;
    @TableField(value = "qq")
    @ApiModelProperty("绑定的QQ")
    private String qq;
    @TableField(value = "micro_blog")
    @ApiModelProperty("绑定的微博")
    private String microBlog;
    @TableField(value = "create_time")
    @ApiModelProperty("创建时间")
    private Date createTime;
    @TableField(value = "update_time")
    @ApiModelProperty("修改时间")
    private Date updateTime;
    @TableField(value = "del_flag")
    @ApiModelProperty("逻辑删除（0=>显示 1=>隐藏）")
    private Integer delFlag;
    @TableField(value = "user_remind")
    @ApiModelProperty("消息提示（0=>开启 1=>关闭）")
    private Integer userRemind;
}
